64 Keypad is a utility written to access 128 specific features such as fast mode and the full keyboard when in 64 mode. To improve it further, I included several other extremely useful features.
The program is contained in DATA statements, and you'll just have to run it in 64 mode as any other BASIC program to install it. The screen will go heywire while BASIC is reading the DATA statements. The computer is temporarily operating in fast (2Mhz) mode to make it as fast as possible; there isn't anything interesting to watch anyway.
If you want to make use of any other utilities in conjunction with 64 KEYPAD+, load and run them first. Make sure that they don't use overlapping memory locations. 64 KEYPAD+ use locations from 52224 to 53247. The "DOS Wedge" utility supplied with Commodore disk drives use the same memory space. Therefore, most programs that is compatible with "DOS Wedge" will be compatible with 64 KEYPAD+. To activate 64 KEYPAD+, load and run it. Since 64 KEYPAD+ preserves all vectors and leaves the normal 64 keyboard free, including the function keys, it will work well with other utilities as well as accelerator/DOS support/toolkit cartridges.
Features:
The main feature of 64 KEYPAD+ is the numeric keypad. This will work as in 128 mode with the exception of the "+" and "-" keys. As one of the most practical uses of the numeric keypad is to aid the entering of DATA statements, these keys have been given special functions. The "+" key will reflect a comma, and the "-" will yield "DATA". Now you can enter DATA statements without moving your hand away from the keypad. Together with the automatic line numbering feature (see below), you may speed up your typing two or three times. At the same time, you will be able to reduce errors considerably. If you prefer all keys to reflect their proper characters, use POKE 52484,40 to restore the "+" key, and POKE 52485,43 to restore the "-" key. If you leave the "+" to yield "DATA", it will only work in direct mode. If you restore it's proper value, however, it will work at all times.
As mentioned before, the numeric keypad isn't the only feature offered. Let's look at the others:
ESCAPE KEY:
Pressing the ESC key will at any time turn off quote and insert mode.
AUTOMATIC LINE NUMBERING:
Automatic line numbering is triggered by typing SYS 52862,line number,increment. Pressing the TAB key will yield this SYS address so you won't have to memorize it. You can exit the automatic line numbering feature by pressing RETURN over a line number by itself. Pressing TAB and RETURN will restart the automatic line numbering at the last number automatically displayed. If you later wish to change the line number and/or increment, just press TAB and enter the new values. When using this feature for the first time after loading 64 KEYPAD+, the line number and increment will both default to 10. The TAB key will only work in direct mode.
FAST MODE:
Pressing the ALT key will alternate between normal (1Mhz) and fast (2Mhz) clock speed. Since the VIC display goes crazy when operating in FAST mode, the screen is blanked. This will not affect the screen contents however. Everything will act as normal, but you won't be able to see what's happening.
You should not use the computer in 2Mhz mode when using disk drives and printer etc. since the 64's operating system don't support the faster clock speed. Although the peripherals will often work, amazingly enough, you should NOT make a habit of it, since unexpected things might occur.
If you wish to incorporate FAST mode in your own programs you can use the lines below to turn fast mode on and off:
POKE 53265,PEEK(53265)AND239:POKE 53296,1:REM FAST
It's the last part (POKE 53296) that's important. The first part of the lines only provides the screen blanking. You don't actually have to blank the screen, so if you prefer a weird screen while the computer read your DATA statements, you may leave it out.
64 KEYPAD+ does have a routine to restore the computer to normal operating speed when RUN/STOP-RESTORE is pressed. But if you use FAST mode without 64 KEYPAD+ installed, the computer will remain in FAST mode. Therefore, make sure your program is debugged before you use the lines above.
DISK DIRECTORY:
Pressing the HELP key will read the directory from disk (device 8) and display it on the screen without disturbing any programs in memory. If you hold down the SHIFT key together with HELP, the directory of device 9 will be displayed. This will also set the default device as used by many DOS support programs and cartridges. You can freeze the display with the LINE FEED or NO SCROLL keys (see below), and continue by pressing NO SCROLL or any other key. Press RUN/STOP to abort.
If you move the cursor up to a program name, it will be automatically loaded when you press RETURN (equivalent to LOAD "Program Name",8,1). If you press SHIFT along with RETURN it will be loaded and then run (LOAD"program name",8 then RUN). The last device number accessed, if it was 8 or 9, will be used. In other cases the routine will access device 8.
What the loading routine looks for is the "PRG" at the end of each directory entry. If the characters "PRG" is not present at the proper place, nothing will happen. Keep this in mind if it should sometimes not work as expected. An error might also occur if you enter a BASIC line with "PRG" at the same place on the screen as when you list the disk directory. 64 KEYPAD+ will then think it's a filename and attempt to load. In practical use, however, you will probably never experience any problems.
LINE FEED and NO SCROLL:
Both keys can be used to freeze the screen display but works slightly different. The NO SCROLL key works exactly as in 128 mode. When pressed it will instantly freeze the text screen display. Press it again, or any other key to continue.
When LINE FEED is pressed, the routine will look for a return character before it freezes the display. Pressing it again will continue the display until the next return character is encountered. This is extremely useful in many cases. You can step slowly through a BASIC listing or a disk directory for example. Just press LINE FEED to display the next line. You can continue as usual by pressing NO SCROLL or any other key.
If you press LINE FEED or NO SCROLL in direct mode, the computer will seem to lock up when you press RETURN. That's because when the next character is to be displayed (the effect of the statement entered, even if RETURN was pressed at a blank line), the freeze feature will have taken effect. So therefore, the computer is waiting for you to un-freeze the display. Press NO SCROLL or any other key, and everything is back to normal. This may also happen within a program. If for example the program is performing a calculation when you press the LINE FEED or NO SCROLL keys, the computer will freeze when the result is to be printed. To you, it would seem like the computer had crashed.
RUN/STOP-RESTORE:
Several features have been added here. The most important is the ability to preserve routines that previously would be disabled by RUN/STOP-RESTORE. Just let 64 KEYPAD+ be the last routine installed. If you wish, on the other hand, to be able to disable a routine by pressing RUN/STOP-RESTORE, you should install that routine AFTER you have installed 64 KEYPAD+. This will sometimes disable all or part of 64 KEYPAD+, but pressing RUN/STOP-RESTORE will bring it back. If you want a routine installed after 64 KEYPAD+ to survive RUN/STOP-RESTORE, type SYS 52254. This will make 64 KEYPAD+ accept the new routine. Please note however, that if 64 KEYPAD+ has been disabled by the new routine when you enter this SYS, 64 KEYPAD+ will NOT be re-enabled by neither RUN/STOP-RESTORE or SYS 52224.
A few routines may disable 64 KEYPAD+'s ability to survive RUN/STOP-restore. If that's the case, type SYS 52224 to re-enable it. The same SYS will also re-enable 64 KEYPAD+ (and some of your other routines) after a reset.
RUN/STOP-RESTORE will when 64 KEYPAD+ is installed be able to recover from more crashes than normally. It will also restore the computer to normal if FAST mode was enabled. If you have made experiments moving the VIC II screen display address, you will have noticed that the computer seem to crash when you press RUN/STOP-RESTORE. This is because the operating system screen memory pointer at location 648 isn't changed back to it's original value. Then the cursor remains in a memory area not displayed by the VIC II chip. This deficiency is fixed by 64 KEYPAD+.
To add these features to the RUN/STOP-RESTORE combination the NMI vector at 792 is changed to point to a specific part of the 64 KEYPAD+ code. A popular way to disable the RUN/STOP-RESTORE combination is to use POKE 792,193. That is in fact, the same value that 64 KEYPAD+ puts in this location. As an effect, the RUN/STOP restore combination will not be disabled by that POKE when 64 KEYPAD+ is installed. On the other hand, if the original value of this location is restored by a program, the computer might crash when RESTORE is pressed. If that should happen, reset the computer, and type SYS 52224.